package ahut2020.day14;

import java.util.Arrays;


public class SubSetDFS {
    //递归程序
    static int n = 5;
    static int[] book = new int[n];

    static void dfs(int k) {
        if (k >= n) {
            System.out.println(Arrays.toString(book));
            return;
        }
        book[k] = 0;
        dfs(k + 1);
        book[k] = 1;
        dfs(k + 1);
    }

    public static void main(String[] args) {
        dfs(0);
    }
}
